home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / x11 / x-scrollbar.el.z / x-scrollbar.el
Encoding:
Text File  |  1998-05-21  |  2.7 KB  |  69 lines

  1. ;;; x-scrollbar.el --- scrollbar resourcing and such.
  2.  
  3. ;;; Copyright (C) 1995 Sun Microsystems.
  4. ;;; Copyright (C) 1995, 1996 Ben Wing.
  5.  
  6. ;; Author: Ben Wing <wing@666.com>
  7.  
  8. ;; This file is part of XEmacs.
  9.  
  10. ;; XEmacs is free software; you can redistribute it and/or modify it
  11. ;; under the terms of the GNU General Public License as published by
  12. ;; the Free Software Foundation; either version 2, or (at your option)
  13. ;; any later version.
  14.  
  15. ;; XEmacs is distributed in the hope that it will be useful, but
  16. ;; WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18. ;; General Public License for more details.
  19.  
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with XEmacs; see the file COPYING.  If not, write to the 
  22. ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  23. ;; Boston, MA 02111-1307, USA.
  24.  
  25. (defun x-init-scrollbar-from-resources (locale)
  26.   (x-init-specifier-from-resources
  27.    scrollbar-width 'natnum locale
  28.    '("scrollBarWidth" . "ScrollBarWidth")
  29.    ;; The name strings are wrong, but the scrollbar name is
  30.    ;; non-deterministic so it is a poor way to set a resource
  31.    ;; for the scrollbar anyhow.
  32.    (cond ((featurep 'athena-scrollbars)
  33.       '("scrollbar.thickness" . "ScrollBar.Thickness"))
  34.      ((featurep 'lucid-scrollbars)
  35.       '("scrollbar.width" . "XlwScrollBar.Width"))
  36.      ((featurep 'motif-scrollbars)
  37.       '("scrollbar.width" . "XmScrollBar.Width"))))
  38.   ;; Athena scrollbars accept either 'thickness' or 'width'.
  39.   ;; If any of the previous resources succeeded, the following
  40.   ;; call does nothing; so there's no harm in doing it all the
  41.   ;; time.
  42.   (if (featurep 'athena-scrollbars)
  43.       (x-init-specifier-from-resources
  44.        scrollbar-width 'natnum locale
  45.        '("scrollbar.width" . "ScrollBar.Width")))
  46.       
  47.   ;; lather, rinse, repeat.
  48.   (x-init-specifier-from-resources
  49.    scrollbar-height 'natnum locale
  50.    '("scrollBarHeight" . "ScrollBarHeight")
  51.    ;; The name strings are wrong, but the scrollbar name is
  52.    ;; non-deterministic so it is a poor way to set a resource
  53.    ;; for the scrollbar anyhow.
  54.    (cond ((featurep 'athena-scrollbars)
  55.       '("scrollbar.thickness" . "ScrollBar.Thickness"))
  56.      ((featurep 'lucid-scrollbars)
  57.       '("scrollbar.height" . "XlwScrollBar.Height"))
  58.      ((featurep 'motif-scrollbars)
  59.       '("scrollbar.height" . "XmScrollBar.Height"))))
  60.   ;; Athena scrollbars accept either 'thickness' or 'height'.
  61.   ;; If any of the previous resources succeeded, the following
  62.   ;; call does nothing; so there's no harm in doing it all the
  63.   ;; time.
  64.   (if (featurep 'athena-scrollbars)
  65.       (x-init-specifier-from-resources
  66.        scrollbar-height 'natnum locale
  67.        '("scrollbar.height" . "ScrollBar.Height"))))
  68.  
  69.